﻿using System;
using System.IO;
using System.Web;
using Soveryn.Commerce.API;
using Soveryn.Commerce.BaseClasses;
using Soveryn.Commerce.Shared;

namespace Soveryn.Commerce.Pages
{
    public partial class CreateSiteImagesCache : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!String.IsNullOrEmpty(Request.QueryString["EmployeeToken"]))
            {
                if (PageBaseClass.EmployeeExternalSessionValid(Request.QueryString["EmployeeToken"]))
                {
                    CacheUtils.UpdateSiteImagesCache();
                    Response.Write("true");
                    return;
                }
            }

            Response.Write("false");

        }
    }
}